﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace TypingG
{
    abstract public  class tBox:System.Windows.Forms.TextBox
    {
        protected int speed;
        protected ProgressBar pBar = new ProgressBar();
        protected ArrayList arrLabel = new ArrayList();
        public tBox()
        {
            
            InitBox(); 
        }
        public void InitBox()
        {
            this.Location = new System.Drawing.Point(5, 22);
            this.Size = new System.Drawing.Size(840, 270);
            this.Name = "tBox";
            this.Enabled = true;
            this.Font = new System.Drawing.Font("Times New Roman",12F,System.Drawing.FontStyle.Bold);
            this.BackColor = System.Drawing.Color.Green;
            this.Multiline = true;
            
            
        }
        //funciton
        public void processbar()
        {
            
            pBar.Value = 0;
            this.pBar.BackColor = System.Drawing.Color.Green;
            this.pBar.ForeColor = System.Drawing.Color.Red;
            this.pBar.Size = new System.Drawing.Size(this.Width - 20, 20);
            this.pBar.Location = new System.Drawing.Point(10, this.Height - 20);
            this.Controls.Add(pBar);
        }
        public void LabelCollection(string m)
        {
            arrLabel.Clear();
            for (int i = 0; i < m.Length; i++)
            {
                Label lb = new Label();
                lb.Text = Convert.ToString(m[i]);
                lb.BackColor = System.Drawing.Color.Green;
                lb.ForeColor = System.Drawing.Color.White;
                lb.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold);
                lb.Size= new System.Drawing.Size(20,20);
                arrLabel.Add(lb);
            }
        }

        abstract public void getStyle();

        
        
    }
}
